Skip to content

feat: additional permission check to show components#856

Merged
pietro-tota merged 16 commits intoCHK-4708-unit-testsfrom
CHK-4708-fix-minor-issues
Feb 10, 2026
Merged

feat: additional permission check to show components#856
pietro-tota merged 16 commits intoCHK-4708-unit-testsfrom
CHK-4708-fix-minor-issues

Conversation

@pietro-tota
Copy link
Contributor

@pietro-tota pietro-tota commented Feb 6, 2026

List of Changes

Refactoring code to hava an unique check method that returns true iff the settings menu can be shown that is:

  • EC origin is valued with IPA
  • user has permission to see settings menu
  • feature flag is enabled

This check have been applied to all settings menu resources in order to have the same check being applied everywhere:

  • routing
  • dashboard informative alert
  • side menu settings label

Service modification action button are now enabled only for admin users and disabled for others

Motivation and Context

Those modifications are needed in order to show settings menu and related messages/section only for enabled users and to allow service modification only for admins (admin check is enforced b.e. side too)

How Has This Been Tested?

local tests

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@pietro-tota pietro-tota marked this pull request as ready for review February 9, 2026 09:08
@pietro-tota pietro-tota requested review from a team, gioelemella and svariant as code owners February 9, 2026 09:08
@github-actions
Copy link

github-actions bot commented Feb 9, 2026

Azure Static Web Apps: Your stage site is ready! Visit it here: https://icy-island-050778e03-856.westeurope.5.azurestaticapps.net

@pietro-tota pietro-tota merged commit 4607299 into CHK-4708-unit-tests Feb 10, 2026
5 checks passed
@github-actions github-actions bot deleted the CHK-4708-fix-minor-issues branch February 10, 2026 10:29
pietro-tota added a commit that referenced this pull request Feb 10, 2026
* feat(wip): test

* chore: restore components

* chore: add missing import + early return

* chore: add error message

* feat: wip tests

* feat: test + page refactoring to help in test

* fix: tests

* chore: remove comment

* chore: lint

* fix: key stiles

* trigger CR pipeline

* chore: update can i use browser list

* chore: add test for errors

* [CHK-4708] feat(integration-test): add service settings page integration tests (#857)

* feat(integration-test): add service settings page integration tests

* feat(integration-test): remove only

* feat(integration-test): add service settings page integration tests

* feat(integration-test): remove only

* feat(integration-test): refactor code

* feat(integration-test): refactor code

* feat: additional permission check to show components (#856)

* feat: additional permission check to show components

* chore: restore dummy value

* chore: enable service modification keys only for admins

* chore: code refactoring

* chore: fix test

* fix: test import

* feat: add tests

* trigger CR pipeline

* feat: add tests for institution service

* chore: remove unused import

* chore: add tests for coverage

---------

Co-authored-by: CianoDanilo <danilo.ciano@pagopa.it>
pietro-tota added a commit that referenced this pull request Feb 10, 2026
* feat(consent-api): add GET service consents API invocation

* feat(consent-api): update error title and description

* Chk 4708 unit tests (#855)

* feat(wip): test

* chore: restore components

* chore: add missing import + early return

* chore: add error message

* feat: wip tests

* feat: test + page refactoring to help in test

* fix: tests

* chore: remove comment

* chore: lint

* fix: key stiles

* trigger CR pipeline

* chore: update can i use browser list

* chore: add test for errors

* [CHK-4708] feat(integration-test): add service settings page integration tests (#857)

* feat(integration-test): add service settings page integration tests

* feat(integration-test): remove only

* feat(integration-test): add service settings page integration tests

* feat(integration-test): remove only

* feat(integration-test): refactor code

* feat(integration-test): refactor code

* feat: additional permission check to show components (#856)

* feat: additional permission check to show components

* chore: restore dummy value

* chore: enable service modification keys only for admins

* chore: code refactoring

* chore: fix test

* fix: test import

* feat: add tests

* trigger CR pipeline

* feat: add tests for institution service

* chore: remove unused import

* chore: add tests for coverage

---------

Co-authored-by: CianoDanilo <danilo.ciano@pagopa.it>

---------

Co-authored-by: Pietro Tota <115724836+pietro-tota@users.noreply.github.com>
pietro-tota added a commit that referenced this pull request Feb 10, 2026
* feat(consent-api): add save consent API invocation on button click

* revert local env file

* feat(consent-api): fix ConsentEnum and Date usage

* feat(consent-api): lint

* feat(consent-api): update error title and description

* chore: merge modification + code refactoring

* [CHK-4708] feat: service settings add get api invocation (#853)

* feat(consent-api): add GET service consents API invocation

* feat(consent-api): update error title and description

* Chk 4708 unit tests (#855)

* feat(wip): test

* chore: restore components

* chore: add missing import + early return

* chore: add error message

* feat: wip tests

* feat: test + page refactoring to help in test

* fix: tests

* chore: remove comment

* chore: lint

* fix: key stiles

* trigger CR pipeline

* chore: update can i use browser list

* chore: add test for errors

* [CHK-4708] feat(integration-test): add service settings page integration tests (#857)

* feat(integration-test): add service settings page integration tests

* feat(integration-test): remove only

* feat(integration-test): add service settings page integration tests

* feat(integration-test): remove only

* feat(integration-test): refactor code

* feat(integration-test): refactor code

* feat: additional permission check to show components (#856)

* feat: additional permission check to show components

* chore: restore dummy value

* chore: enable service modification keys only for admins

* chore: code refactoring

* chore: fix test

* fix: test import

* feat: add tests

* trigger CR pipeline

* feat: add tests for institution service

* chore: remove unused import

* chore: add tests for coverage

---------

Co-authored-by: CianoDanilo <danilo.ciano@pagopa.it>

---------

Co-authored-by: Pietro Tota <115724836+pietro-tota@users.noreply.github.com>

---------

Co-authored-by: Pietro Tota <115724836+pietro-tota@users.noreply.github.com>
Co-authored-by: pietro.tota <pietro.tota@pagopa.it>
pietro-tota added a commit that referenced this pull request Feb 10, 2026
* feat: status chip calculation

* chore: code refactoring

* chore: code review

* chore: service enabling data

* chore: remove edit contacts button

* chore: activation date calculation

* fix: env variable name

* chore: code optimization

reduce to one modal instead of duplicating the same one
make use of react component instead of function invocation

* [CHK-4708] feat: service settings add PUT consent api invocation (#852)

* feat(consent-api): add save consent API invocation on button click

* revert local env file

* feat(consent-api): fix ConsentEnum and Date usage

* feat(consent-api): lint

* feat(consent-api): update error title and description

* chore: merge modification + code refactoring

* [CHK-4708] feat: service settings add get api invocation (#853)

* feat(consent-api): add GET service consents API invocation

* feat(consent-api): update error title and description

* Chk 4708 unit tests (#855)

* feat(wip): test

* chore: restore components

* chore: add missing import + early return

* chore: add error message

* feat: wip tests

* feat: test + page refactoring to help in test

* fix: tests

* chore: remove comment

* chore: lint

* fix: key stiles

* trigger CR pipeline

* chore: update can i use browser list

* chore: add test for errors

* [CHK-4708] feat(integration-test): add service settings page integration tests (#857)

* feat(integration-test): add service settings page integration tests

* feat(integration-test): remove only

* feat(integration-test): add service settings page integration tests

* feat(integration-test): remove only

* feat(integration-test): refactor code

* feat(integration-test): refactor code

* feat: additional permission check to show components (#856)

* feat: additional permission check to show components

* chore: restore dummy value

* chore: enable service modification keys only for admins

* chore: code refactoring

* chore: fix test

* fix: test import

* feat: add tests

* trigger CR pipeline

* feat: add tests for institution service

* chore: remove unused import

* chore: add tests for coverage

---------

Co-authored-by: CianoDanilo <danilo.ciano@pagopa.it>

---------

Co-authored-by: Pietro Tota <115724836+pietro-tota@users.noreply.github.com>

---------

Co-authored-by: Pietro Tota <115724836+pietro-tota@users.noreply.github.com>
Co-authored-by: pietro.tota <pietro.tota@pagopa.it>

---------

Co-authored-by: CianoDanilo <danilo.ciano@pagopa.it>
pietro-tota added a commit that referenced this pull request Feb 10, 2026
* empty

* feat: add popup + use trans for links

* feat: popup menus

* chore: dummy jwt token

* feat: add info alert

* chore: add translations

* feat: add loader

* chore: add TODO message

* feat: add state changer + mock update action

* feat: status chip calculation (#851)

* feat: status chip calculation

* chore: code refactoring

* chore: code review

* chore: service enabling data

* chore: remove edit contacts button

* chore: activation date calculation

* fix: env variable name

* chore: code optimization

reduce to one modal instead of duplicating the same one
make use of react component instead of function invocation

* [CHK-4708] feat: service settings add PUT consent api invocation (#852)

* feat(consent-api): add save consent API invocation on button click

* revert local env file

* feat(consent-api): fix ConsentEnum and Date usage

* feat(consent-api): lint

* feat(consent-api): update error title and description

* chore: merge modification + code refactoring

* [CHK-4708] feat: service settings add get api invocation (#853)

* feat(consent-api): add GET service consents API invocation

* feat(consent-api): update error title and description

* Chk 4708 unit tests (#855)

* feat(wip): test

* chore: restore components

* chore: add missing import + early return

* chore: add error message

* feat: wip tests

* feat: test + page refactoring to help in test

* fix: tests

* chore: remove comment

* chore: lint

* fix: key stiles

* trigger CR pipeline

* chore: update can i use browser list

* chore: add test for errors

* [CHK-4708] feat(integration-test): add service settings page integration tests (#857)

* feat(integration-test): add service settings page integration tests

* feat(integration-test): remove only

* feat(integration-test): add service settings page integration tests

* feat(integration-test): remove only

* feat(integration-test): refactor code

* feat(integration-test): refactor code

* feat: additional permission check to show components (#856)

* feat: additional permission check to show components

* chore: restore dummy value

* chore: enable service modification keys only for admins

* chore: code refactoring

* chore: fix test

* fix: test import

* feat: add tests

* trigger CR pipeline

* feat: add tests for institution service

* chore: remove unused import

* chore: add tests for coverage

---------

Co-authored-by: CianoDanilo <danilo.ciano@pagopa.it>

---------

Co-authored-by: Pietro Tota <115724836+pietro-tota@users.noreply.github.com>

---------

Co-authored-by: Pietro Tota <115724836+pietro-tota@users.noreply.github.com>
Co-authored-by: pietro.tota <pietro.tota@pagopa.it>

---------

Co-authored-by: CianoDanilo <danilo.ciano@pagopa.it>

---------

Co-authored-by: CianoDanilo <danilo.ciano@pagopa.it>
@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://icy-island-050778e03-856.westeurope.5.azurestaticapps.net

@sonarqubecloud
Copy link

pietro-tota added a commit that referenced this pull request Feb 11, 2026
* feat: add settings menu

* wip: setting page

* wip: settings page

* chore: revert perm

* fix: text

* Add alert title and description

* wip

* chore: restore condition

* wip: setting menu

* chore: add ff

* feat: add ff

* chore: use link component + eslint

* chore: refactoring

* chore: remove log

* feat: popup messages (#850)

* empty

* feat: add popup + use trans for links

* feat: popup menus

* chore: dummy jwt token

* feat: add info alert

* chore: add translations

* feat: add loader

* chore: add TODO message

* feat: add state changer + mock update action

* feat: status chip calculation (#851)

* feat: status chip calculation

* chore: code refactoring

* chore: code review

* chore: service enabling data

* chore: remove edit contacts button

* chore: activation date calculation

* fix: env variable name

* chore: code optimization

reduce to one modal instead of duplicating the same one
make use of react component instead of function invocation

* [CHK-4708] feat: service settings add PUT consent api invocation (#852)

* feat(consent-api): add save consent API invocation on button click

* revert local env file

* feat(consent-api): fix ConsentEnum and Date usage

* feat(consent-api): lint

* feat(consent-api): update error title and description

* chore: merge modification + code refactoring

* [CHK-4708] feat: service settings add get api invocation (#853)

* feat(consent-api): add GET service consents API invocation

* feat(consent-api): update error title and description

* Chk 4708 unit tests (#855)

* feat(wip): test

* chore: restore components

* chore: add missing import + early return

* chore: add error message

* feat: wip tests

* feat: test + page refactoring to help in test

* fix: tests

* chore: remove comment

* chore: lint

* fix: key stiles

* trigger CR pipeline

* chore: update can i use browser list

* chore: add test for errors

* [CHK-4708] feat(integration-test): add service settings page integration tests (#857)

* feat(integration-test): add service settings page integration tests

* feat(integration-test): remove only

* feat(integration-test): add service settings page integration tests

* feat(integration-test): remove only

* feat(integration-test): refactor code

* feat(integration-test): refactor code

* feat: additional permission check to show components (#856)

* feat: additional permission check to show components

* chore: restore dummy value

* chore: enable service modification keys only for admins

* chore: code refactoring

* chore: fix test

* fix: test import

* feat: add tests

* trigger CR pipeline

* feat: add tests for institution service

* chore: remove unused import

* chore: add tests for coverage

---------

Co-authored-by: CianoDanilo <danilo.ciano@pagopa.it>

---------

Co-authored-by: Pietro Tota <115724836+pietro-tota@users.noreply.github.com>

---------

Co-authored-by: Pietro Tota <115724836+pietro-tota@users.noreply.github.com>
Co-authored-by: pietro.tota <pietro.tota@pagopa.it>

---------

Co-authored-by: CianoDanilo <danilo.ciano@pagopa.it>

---------

Co-authored-by: CianoDanilo <danilo.ciano@pagopa.it>

* Bump to version 1.46.0-1-CHK-4708-service-settings-section [skip ci]

* fix: add org is ec and broker to check

---------

Co-authored-by: danilo.ciano <danilo.ciano@pagopa.it>
Co-authored-by: pagopa-github-bot <github-bot@pagopa.it>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants